<?php
if (!defined('APP_ID')) { die('No direct script access allowed'); }

/**
 * Array operations
 */
class Arr {
	/**
	 * Get value from array
	 */
	public static function get($array, $offset, $default = null) {
		$result = $default;

		if (is_array($offset)) {
			$result = array();
			foreach ($offset as $value) {
				if (isset($array[$value])) {
					$result[$value] = $array[$offset];
				} else {
					$result[$value] = null;
				}
			}
		} else {
			if (isset($array[$offset])) {
				$result = $array[$offset];
			}
		}

		return $result;
	}
	
	public static function merge($arr1, $arr2) {
		return array_merge($arr1, $arr2);
	}
}